package com.hq.ims.data.service;

import com.hq.ims.data.dao.AppFileMapper;
import com.hq.ims.data.entity.AppFile;
import com.hq.ims.data.utils.LocalConstant;
import com.hq.mybatis.base.BaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Administrator
 */
@Service
@Slf4j
public class BaseAppFileService extends BaseService<AppFileMapper, AppFile> {

    /**
     * 获取app数据
     */
    public AppFile getByIdAndAppId(
            String appFileId
    ) {
        AppFile appFile = this.lambdaQuery()
                .eq(AppFile::getAppId,appFileId)
                .last(LocalConstant.LIMIT_1)
                .one();
        return appFile;
    }
}

